﻿// 1.1.3.09. Write an expression that checks for given point (x, y) if it is within the circle K( (1,1), 3) and
// out of the rectangle R(top=1, left=-1, width=6, height=2).

using System;

class PointInOutCoordinates
{
    static void Main()
    {
        Begin:
        {
            Console.Write("Please enter the first coordinate of a point! x = ");
            float xCo_ordinate = float.Parse(Console.ReadLine());
            Console.Write("Please enter the second coordinate of a point! y = ");
            float yCo_ordinate = float.Parse(Console.ReadLine());
            bool inTheCircle = (Math.Sqrt(xCo_ordinate * xCo_ordinate + yCo_ordinate * yCo_ordinate)) <= 5;
            bool outTheRectangular = (((xCo_ordinate <= -1) || (xCo_ordinate >= 5)) || ((yCo_ordinate <= 1) || (yCo_ordinate >= 5)));
            bool inCircleAndOutOfRectangular = inTheCircle && outTheRectangular;
            Console.WriteLine("The point you have entered is in the circle and out of the rectangular: " + inCircleAndOutOfRectangular);
            Console.WriteLine();
        }
        goto Begin;
    }
}